local assets =
{
    Asset("ANIM", "anim/bboy_books.zip"),
    Asset("ANIM", "anim/swap_bboy_books.zip"),
}

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddSoundEmitter()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBank("bboy_books")
    inst.AnimState:SetBuild("bboy_books")
    inst.AnimState:PlayAnimation("bboy_book_survival_guide")

    MakeInventoryFloatable(inst, "med", nil, 0.75)

    inst:AddTag("book_survival_guide")
    inst:AddTag("bookcabinet_item") -- 可以放入书架

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    -----------------------------------

    inst.swap_build = "swap_bboy_books"
    inst.swap_prefix = "book_survival_guide"

    inst:AddComponent("inspectable")

    inst:AddComponent("inventoryitem")

    inst:AddComponent("bboy_multi_teacher")
    inst.components.bboy_multi_teacher:SetRecipes({
        "bboy_river_lantern",
        "bboy_candle_item",
        "bboy_candle_lamp",
        "wall_bboy_courtyard_item",
    })

    MakeSmallBurnable(inst, TUNING.MED_BURNTIME)
    MakeSmallPropagator(inst)

    inst:AddComponent("fuel")
    inst.components.fuel.fuelvalue = TUNING.MED_FUEL

    MakeHauntableLaunch(inst)

    return inst
end

return Prefab("bboy_book_survival_guide", fn, assets, prefabs)
